<template>
  <div>
    <van-circle
        style="float: right;margin: 20px"
        v-model:current-rate="currentRate"
        :rate="rate"
        size="30px"
        :color="gradientColor"
        :text="str1"
    />
    <van-image :src="require('../assets/bk.png')" width="375" height="477">
    </van-image>
    <h4 style="color: lightcoral">喜茶APP，懂你的APP</h4>
  </div>
</template>

<script>
export default {
  name: "MainView",
  data(){
    return{
      rate:100,
      currentRate:100,
      str1:"5s",
      gradientColor:{
        '0%': '#3fecff',
        '100%': '#6149f6',
      }
    }
  },mounted() {
    var c=setInterval(()=>{
      if(this.currentRate>0){
        this.currentRate-=20;
        this.str1=this.currentRate/20+"s";
      }else {
        clearInterval(c);
        this.$router.push("/login");
      }

    },1000);
  }
}
</script>

<style scoped>
#dv1{
  width: 100%;
  height: 100%;
  background: url("../assets/xicha.png");
}
</style>